Algorithms to Live By: The Computer Science of Human Decisions by Brian Christian & Griffiths
Author:Brian Christian & Griffiths [Christian, Brian]
Language: eng
Format: epub
Publisher: HarperCollins Publishers
Published: 2016-04-19T00:00:00+00:00
The Three-Part Tradeoff
At once it struck me what quality went to form a Man of Achievement, especially in Literature, and which Shakespeare possessed so enormouslyâI mean Negative Capability, that is, when a man is capable of being in uncertainties, mysteries, doubts, without any irritable reaching after fact and reason.
âJOHN KEATS
There is no such thing as absolute certainty, but there is assurance sufficient for the purposes of human life.
âJOHN STUART MILL
Computer science is often a matter of negotiating tradeoffs. In our discussion of sorting in chapter 3, for instance, we noted the tradeoff between time spent up front on sorting versus the time spent later on searching. And in the discussion of caching in chapter 4, we explored the tradeoff of taking up extra spaceâcaches for caches for cachesâto save time.
Time and space are at the root of the most familiar tradeoffs in computer science, but recent work on randomized algorithms shows that thereâs also another variable to consider: certainty. As Harvardâs Michael Mitzenmacher puts it, âWhat weâre going to do is come up with an answer which saves you in time and space and trades off this third dimension: error probability.â Asked for his favorite example of this tradeoff into uncertainty, he doesnât hesitate. âA colleague just said that there should be a drinking game that every time this term appears on one of my slides, you have to take a drink. Have you ever heard of Bloom filters?â
To understand the idea behind a Bloom filter, Mitzenmacher says, consider a search engine like Google, trying to crawl the entire web and index every possible URL. The web is comprised of well over a trillion distinct URLs, and the average URL weighs in at about seventy-seven characters long. When the search engine looks at some URL, how can it check whether that page has already been processed? Just storing a list of all the URLs that have been visited would take a huge amount of space, and repeatedly searching that list (even if it were fully sorted) could prove a nightmare. In fact, it could well be that the cure is worse than the disease: in other words, checking every time to make sure that weâre not reindexing a page might be more time-consuming than just indexing the occasional page twice.
But what if we only needed to be mostly sure this URL was new to us? Thatâs where the Bloom filter comes in. Named for its inventor, Burton H. Bloom, a Bloom filter works much like the Rabin-Miller primality test: the URL is entered into a set of equations that esssentially check for âwitnessesâ to its novelty. (Rather than proclaim ân is not prime,â these equations say âI have not seen n before.â) If youâre willing to tolerate an error rate of just 1% or 2%, storing your findings in a probabilistic data structure like a Bloom filter will save you significant amounts of both time and space. And the usefulness of such filters is not confined to search engines: Bloom
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(25281)
Hello! Python by Anthony Briggs(24331)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(23419)
Kotlin in Action by Dmitry Jemerov(22501)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(21955)
Dependency Injection in .NET by Mark Seemann(21836)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(20701)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(19514)
Grails in Action by Glen Smith Peter Ledbrook(18593)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17028)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(15836)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(13683)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(11847)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11149)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10620)
Hit Refresh by Satya Nadella(9185)
The Kubernetes Operator Framework Book by Michael Dame(8560)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8400)
Robo-Advisor with Python by Aki Ranin(8356)